import java.util.Scanner;

/**
 * Created by dllo on 18/3/28.
 */
public class Question4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个三位数");
        int u = scanner.nextInt();
        int u0 = u;
        if (u >= 100 && u < 1000) {
            int a = u / 100;// 求出百位数
            u = u % 100;     //求出余数
            int b = u / 10;//求出十位数
            u = u % 10;//求出个位数
            int c = u;
            if (u0 == a * a * a + b * b * b + c * c * c) {
                System.out.println("这个数是水仙花数");
            } else {
                System.out.println("这个数不是水仙花数");
            }


        } else {
            System.out.println("输入异常");
        }

    }

}
